fully test conversion of app reference to value, fix bugs discovered while testing