Fixing bugs

Cross-browser issues.