Fixed errors and probably added new ones