fix bug in main fork