Some bug fixes ;-)