Prevent off by one error and some minor ui fixes