Fixed the not optional callback and fixed small mistakes