Fixed bugs and single quote problem