some fixes from 1.5.2