Refined collision and fixed a graphics bug