Error in resolve