Fix possible crash on startup.

Don't calculate space for tab if the available
space is negative.