changed condition to check for visibility when floating