fixed a bug in pages and made it possible to overwrite page templates