Fixed write features bug