Fixed bugs with put method