adds guard against camera freezing