fix orglendar.register function