Adding cast to get rid of compiler warning.