Fixed the setup bugs