Add cast to observer.sh