Corrected bug regarding the following issue

https://github.com/FriendsOfSymfony/FOSRestBundle/issues/296#openstruct-143969320