Fix for NullPointerException when trying to generate controller which extends base class

fixes #61