Adding in the change recommended by Alexander Farkas to fix some bugs in the change...