bugfix: casting