Asset cache

Fixed problem when pending is false, loaded is true.