fix compile issue in database