Fixed plot not updating issue