Fixed pdf and added broken functionality back