Fixed notes code for Rest api