Updated to work with symfony 2.4