resolves #14: fix hinky logic in determining debug function