fixed some bugs in the margins and floats