Added better card image handling.