JS capty bugfix