Fixed a bug on generation of a REST controller