fixed sql and zone crashes #141 #138