Removed loadedmetadata check