Fixed some bugs (not made new ones hopefully)