fixed incorrect handling of passed parameters

Signed-off-by: Andreas Heiberg <git@andreas-heiberg.com>