Fixed compile errors in debug mode