fixed: casting + updated test