Corrected bug regarde the following issue

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