Improve on the fly insertions support + some minor fixes