fixed bug of removing resource and cleaning it up in scenes