fix passing invalid parametrs to flock. #51