that part was so ugly ;)

@Rik you may have a good idea to make this better ?