Fixed errors properly