Make borders pixel perfect (fix #196)