fix crash issue related to build off ally code