Fixed error caused by compiling in release mode