Added automatic centering