minor improvements/fixes for fragment handling