removed spaces at line endings
fixed possible uninitalized pointer read