fixed ressource gain bug