make sure not to double info in attributes
correct maxwidth/height as values were switched