fixes type error on callback