B rbugfixes

After I added -Wall to CFLAGS I found 2 issues.
Find 2 commits which solve the issues.