Fixed syntax errors and improved dereferencing