Fixed a little bug on adding menu elements from page list