bug in item coffescript code