External SP pages and some bug fix