Fixed issues with advanced compilation