Moved around the callback method into the right place.