Extended action in Pages model. Fix some bugs.