Fixed a bug and added css prefixes for Firefox.