BUGFIX: Casting (please review Daniel)