bugfixes callback
fix various small bugs