need some bugfix for resource