The lazyClose parameter was only checked if it is undefined or not. The passed boolean was not checked.