keyframe cleanup

removed a duplicate declaration; addad a  cast that seemed to be needed