Fixed write outof boundary