fixed pattern matching warnings