fix bug with reg button