small fix for a js exception