Fix bug in writing bed from coding variant positions