Fixed bug with generating POs