Fixed collision detection problems in prototype.