Fix Null Reference Error, Removed Rendundant Code