fix minor bugs in patcher

Signed-off-by: Marian 'VooDooMan' Meravy <vdm113@gmail.com>