swapped lines to prevent exception on assertion
Merge pull request #884 from ardcore/master

Thank you for your review, Szymon Piłkowski.