More elegant solution to the previous bug.
Fixed bug when launching with no arguments.