Fixed some issues in runtime-detection tests