Fixed some error stuff