Many project fixes

In order to build release properly.