fixing improper handling of argument in invalidapi