some fixes, much faster