Fixed offset and syntax bugs