Added minwidth and minheight parameters