Fix some bugs, firefox refuses to update.

Re-opens #12