Tweaks and fixes for testing