Fix "Can not use method return value in write context" error