Added check for callback existence