Miscaleous fixes