fixed some bugs with the latest toolkit changes