Added a bit of cancel on JS support