Fix bugs in nullable and add first