Debug check. Closes #236.