remove unused vars & fix failed wxassertion because of wrong sized image