Fixes some 'last minute' bugs. [psover, ianonavy]