Fixed the before callback to have the proper elem parameter when called, broken in commit 9489358 that fixes issue #22