fixes error running from command line