Fixed removeNote function