Fixed release mode compilation bugs.