issue #671 fix
text foreground logic needed fix
issue #658 fix