Fixed bug in maximizer