fixed broken floor function