Some fixes
better performance