added GUI level checking for invalid characters in expressions