fixed a bug in the doctrine module