solved some bugs with data handler