fixed argument handling

previously this led to an IndexError if no arguments were passed