Added C++-style cast for compatability.