Fixing problems with adding optimized build