Some improvement and fix