cast match to integer to silence mavericks warning