Added fix for resource delete 500 issue