Fixed bugs on lines 252 and 289.