Part of the leisure centre had to be closed to the public