Changed Several if(...)