fixed pattern match syntax error