Fixed error checking on chk_str2double which could be erroneously tripped