Bug fixes in harbour functionality