added fix to support older wx