Fixed disabling assertions on DEBUG

Provided by Denny