added fixes for the generate:resource command to make it work more reliable