Removed line duplicates, fixed compile error