fixing typos
do not exec if uid == -1
call write_cb explicitly to clean up used memory incase client closes
remove ip in write_cb, connection might have already got closed