Align master page tables correctly
Removed duplicated bitmap search  function