Fixed crash when not specifying a directory