some fixes for new implmentation