Fixed release build errors