fixing normal variable bug