Fixes deprecated function usage Fixes #22