Fixes to make work without ?debug