some little bug fixes