fix warnings about deprecated syntax