Convert factor to integer before calculating cross tabs.