corrected checks for default value, thanks Ross
closes #389