small improvement and bug fixes