Adding release call to functions

This fixes issue #1.