Bug fixes and some improvment in ptb page type class