Made callbacks work better