Resolved most errors