Added getBet callback, fixed some errors