fixed bug with not being able to retrieve function from module