Fixed the management of occupancies