Fix issue when empty code string was allowed - closes #5