Fixed major error in dir/firmware handling.