Fixed syntax bugs so code can compile