Minor fixes to get it working.