Fix calculation of available space

Signed-off-by: Lehner Florian <dev@der-flo.net>