Fixes and improvemnts