fixed double call to loaded() function
Replacing master with this current branch