Minor bug fixes (found with Chrome v38)