fix backend script generating wrong oparity