problem with apply line 378