fixed standalone detection