Fixed behaviour in release mode.