Fix for takes as a function