Fixed some browser specific javascript issues.