FIX SOME BUGS