Fixed some bugs with non-proper amr boundaries