Fixed by adding conditional