Fixed Bug Flink-978

https://issues.apache.org/jira/browse/FLINK-978