Some bugfix and Improvments