Added header import
Fixed deprecation warning
fixed compiler warning