bugfix in required target calculation