fixed broken functionality