some fixes

more or less working.
still buggy with bg drawing