Added a a check for number of input arguments to checkspmrunning() for backwards compatibility