fixed bug in resolution after detection