Fixing bugs

Signed-off-by: Edwin Luijten <edwin.luijten@live.nl>