Fixed some bugs in build settings. Now it uses correct debug/release build flags.