Fixed bug in js action