fixes, improving tests