Add proper check for dynamic plot