resolved some runtime bugs