fix: float cast to avoid downcast error

This is an untested fix to a problem reported by Katharina Eggensperger. fingers crossed...