latest changes (mainly bug fixes)