some fix redmine#171