Miscallenous fixes