Added code to updateG for x outside lowerG bounds