Fixed several bugs in POM.