fix snake boundrary