some fix and TODOs