Fix new instance

according to https://github.com/doctrine/doctrine2/commit/e577e7786796e9393df381f02221046dea6253a5 and https://github.com/doctrine/doctrine2/commit/46ebb57b45de4bd1302e9c4a12aa455d39b51999