Fixed a bug, dont know why it didnt work but fixed it nonetheless