Using `commit` instead of `apply`

Fixes #124 

thanks @roundhill