action php + main js fixes