fixed mistake that id was written into class attribute