Some bug fixing.