fixed error when input starts with '.'
fixed error when input starts with '.'