off by one error preventing movement on first click