fixed some bugs

becomming pretty reliable now =D