Fixed bug, making it crash