fixed the build and correct writter call