add stripping if not debug mode - moved debug and bound check init