Fixed memory leak on error handling
Fixed memory leak while creating error
Disabled warnings