Added bound checking to the mov direction method