Changed sidebar placement function