Small fixes and improvments