Used better assert
Merge pull request #147 from WouterJ/improve_asserts

Used better assert