whitespace cleanup
fix callback triggering sequence