Fix collision pancing on the edges