Fix issue #20

This will fix the following issue introduced by previous commit: https://github.com/sonata-project/SonataCoreBundle/issues/20