Converted tabs to spaces and bugfix