fix bugs, fix race condition in output projection transformation, and others