added delay to avoid bug on rpi