Fixes type error on callback