fix some animation and margin problems