Fixes a type error while compiling