cleanup: remove casts to avoid new warnings