resolve a bug with ressource check