swapped lines to prevent exception on assertion