Minor bug fixes in maximizing