Fixed projectile collision bug

Fixed code to not crash my browser.