fixed bug that weight is not reflected correctly
consider window margins
updated changelog