fixed bug with resource listeners