fixed some issues that was causing selenium to crash, still doesn't look perfect though