Fixed some bugs where it wasn't working, should be working now