fixed compilation issues due to malformed patch