[js fix] fix problem with border cardinals