Fixed a bug in the doctrine module that caused metadata lookup error