fixed path bugs, assertion and debug