Fixed bug in top pm template