Fixes bug 330 and bug 340

Signed-off-by: Michel <info@1st-setup.nl>