fix a bit more
opt solution, ugly...