fixed margin bugs