minor cleanup and fix