Checks for error in last  character