Fixed errors as adviced.