Moved reply out of helper function in server