fixing $id error