small improvement and fix