fixed bug with crashing after second move