bugfix, cast