fix intent handling, improved compatibility