Minor improvement and little bug fix