Fix Javascript Errors