Fixed issue with malloc using different variable to how many cards were needed.