added vendor path and fixed invalid() bug