Fixed pre and post actions not triggering
Add toJSON