fixed bug caused by wrong argument type passed to .apply on the expression