Change note id logic and add redirect if note does not exist