Further improved premake logic