Properly fixing parameer check