0.3.1: Fix bugs in toJSON methods and group callbacks