Updated angular.js and added check to avoid calling the server when it's not your turn