changed static field getter method to take into account current execution mode.