fixing resolve timing issue