fixed crashes
added option to control gap load behavior