fix scaling
fix coord for mac os
minor changes