fixed isLoaded implementation