Collision fixed and some bugs in the AI