Small tab overhaul to fix bugs (reverted from commit 4de5aef473886411a94a69011de2616ef5192b3c)