fix loading check