Fixed error in note controller that was setting scope to null