Some bug fixes!