Fixed cast for compilation