Javascript: Fixes