AIR fixes #84, #109, #139, #151