Fixed trying to use return in write context