bug 1136: fixed references $id and $userid