Handle auto dimensions correctly