fixing bugs CST-276, CST-277 and CST-278