boundary fixes