wxASSERT added for debug purposes