Fixed memory overflow and excessive CPU usage issues with deadlock prevention
Merge branch 'master' of github.com:ewoutp/BinkyRailways