Fix extension bugs on page edit

Signed-off-by: Alfred Xing <xing@lfred.info>