Changed initialization and corrected tab problem